package com.daafan.minilib.data;

import java.util.List;

import net.tsz.afinal.FinalDb;
import net.tsz.afinal.annotation.sqlite.Id;
import android.content.Context;

public class Skin {
	@Id
	private int		id;
	public String	url	= "";

	public Skin() {}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public static void deleteAll(Context context) {
		FinalDb db = FinalDb.create(context);
		List<Skin> list = db.findAll(Skin.class);

		for (Skin skin : list) {
			if (skin != null)
				db.delete(skin);
		}

		list = db.findAll(Skin.class);
	}
}
